<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>静态数据树</title>
	<link  href="../jquery.tree.css" rel="stylesheet" type="text/css"  class="view-source"/>
	<link  href="../../../../themes/default/style.css" rel="stylesheet" class="view-source">
	<script src="../../../../scripts/jquery.js" type="text/javascript" class="view-source"></script>
	<script src="../../../../scripts/common.js" type="text/javascript" class="view-source"></script>
	<script src="../../../../scripts/browserfix.js" type="text/javascript"  class="view-source"></script>
	<script src="../../../../scripts/plugins/jquery.json.js" type="text/javascript"></script>
	
	<script src="../jquery.tree.js" type="text/javascript" class="view-source"></script>
	
	<script src="../../demo.js"></script>
	<link href="../../demo.css" rel="stylesheet">

	
<script class="view-source noparse">
$(function(){
	var json_data = {//静态数据
			id:'11',
			text:'根节点',
			isExpand:true,
			classes:"red-cls",
			childNodes:[{
				id:'21',
				text:'子节点1',
				classes:"red-cls",//自定义风格
				tt:"23423",
				childNodes:[{
					id:'youda1',
					text:'子节点1-1'
				}]
			},{
				id:'31',
				text:'子节点2'
			}]
		 };

	$('#default-tree').tree({//tree为容器ID
		source:'array',
		data:json_data
    }) ;
	
})
</script>
	
</head>

<body>
	<div id='content-default' class='demo'>
		<h1></h1>
		<div id="default-tree" class="tree view-source" style="padding: 5px; overflow-y: auto; height:100px;"></div>
	</div>

</body>
</html>